#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

int judge(int n)
{
    int count = 0;
    for (int i = 1; i < n; i++)
    {
        for (int j = i; j < n; j++)
        {
            if ((i + j) == n && (i * j) % 3 == 0)
                count++;
        }

    }
    return count;
}

int main()
{
    int n;
    scanf("%d", &n);
    int count = judge(n);
    printf("%d", count);
    return 0;
}